/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dvd.modeles;

import java.io.Serializable;
import javax.persistence.*;

@Entity
public class JouerRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ManyToOne(targetEntity = Film.class)
        @JoinColumn(name="FILM_ID", nullable=false)
        private Film film;
    @Id
    @ManyToOne(targetEntity = Personne.class)
        @JoinColumn(name="PERSONNE_ID", nullable=false)
        private Personne personne;
    private String leRole;

    public JouerRole(Film film, Personne personne, String leRole) {
        this.film = film;
        this.personne = personne;
        this.leRole = leRole;
    }

    public JouerRole() {
    }

    public Film getFilm() {
        return film;
    }

    public void setFilm(Film film) {
        this.film = film;
    }

    public String getLeRole() {
        return leRole;
    }

    public void setLeRole(String leRole) {
        this.leRole = leRole;
    }

    public Personne getPersonne() {
        return personne;
    }

    public void setPersonne(Personne personne) {
        this.personne = personne;
    }

}
